﻿<%@ Page Title="【福彩3D投注】" Language="C#" MasterPageFile="~/APP_Master/MasterPage_3D_Lottery.master"
    AutoEventWireup="true" CodeFile="3d_zl.aspx.cs" Inherits="_3d_zl" %>
    <%@ Register Src="~/APP_Controls/ForecastPost_fc3D.ascx" TagName="forecast" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
   <script src="App_Themes/js/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="js/jquery-1.9.1.js" type="text/javascript"></script>
    <script src="App_Themes/js/jquery.jBox-2.3.min.js" type="text/javascript"></script>
    <script src="App_Themes/js/jquery.jBox-zh-CN.js" type="text/javascript"></script>
    <link href="App_Themes/css/Blue/jbox.css" rel="stylesheet" type="text/css" />
   <style type="text/css">
.touchu_ul1{
	width:100%;
	height:140px;
	overflow-y:auto;
	overflow-x:hidden;
	}
.touchu_ul1 dt{
	width:100%;
	height:28px;
	line-height:28px;
	background:#fff6db;
	color:#333;
	padding-right:10px;
	}
.touchu_ul1_span1 a{
	color:#333;
	}
.touchu_ul1_span1{
	float:right;
	padding-right:15px;
	}
.touchu_ul1 dt b{
	padding-left:10px;
	color:#000;
	}
.touchu_ul1 dt b.touchu_ul1_b{
	padding:0 10px;
	color:#c60000;
	}
	.lan1{
	color:#1379d7;
	}
</style>
<script type="text/javascript">
        var ArrayList = new Array();
        var ArrayW = new Array();
        var ArrayDelete = new Array();
        //------------------Start------------------
        if (getCookie("ArrayList_3d") != '') {
            var arrarraylist = eval(getCookie("ArrayList_3d"))
            //console.log(arrarraylist);
            for (j = 0; j < arrarraylist.length ; j++) {
                ArrayList.push(arrarraylist[j]);
            }
        }
        if (getCookie("ArrayList_3dDelete") != '') {
            var arrarraylistDelete = eval(getCookie("ArrayList_3dDelete"))
            //console.log(arrarraylist);
            for (j = 0; j < arrarraylistDelete.length ; j++) {
                ArrayDelete.push(arrarraylistDelete[j]);
            }
        }
        //console.log(ArrayList);
        console.log(sumTotal());
        //------------------End------------------
        var count = 0; 
        function sumTotal(){
           count = parseInt(fibonacci(ArrayW.length) / fibonacci(3) / fibonacci(ArrayW.length - 3)); 
            jQuery("#totalCout").html(count);
            jQuery("#totalMoney").html(count * 2);
            jQuery("#yourSelect").html(count);
            jQuery("#yourMoney").html(count * 2); 
        }
        function addRedBall(obj,value) {
               var index = $.inArray(value, ArrayW);
                if (index > -1) {
                    ArrayW.splice(index, 1);
                } else {
                    ArrayW.push(value);
                }
                document.getElementById("Hidden1").value = ArrayW;
                $(obj).toggleClass("ball_btn_active"); 
            count= parseInt(fibonacci(ArrayW.length) / fibonacci(3) / fibonacci(ArrayW.length - 3)); 
            jQuery("#totalCout").html(count);
            jQuery("#zhushu").html(count);
            jQuery("#totalMoney").html(count * 2);
        } 
        function fibonacci(n) {
            var rtn = 1;
            if (n > 1) {
                var i = 1; 
                while (i <= n) {
                    rtn = rtn * i;
                    i++;
                }
            }
            return rtn;
        }  
        function displayck() {
            document.getElementById("myselfDiv").style.display = "none";
        }
        function displaycl() {
            document.getElementById("myselfDiv").style.display = "block";
        }
         function setgongkai(obj){ 
          document.getElementById("gongkaiHid").value = obj; 
         }
         function login() {

             $("#box11 .011").trigger('click');
         }
         function addBuyInfo() {
             $.ajax({
                 type: "get",
                 dataType: "text",
                 url: "Ajax/CMember.ashx?",
                 data: { t: 'GetLoginInfo' },
                 success: function (data) {
                     if (data.indexOf('请登录') != -1) {
                         login();
                         return false;
                     }
                     else
                     {
                                    document.getElementById("lotteryStr").value = ArrayList; 
            if(ArrayList.length<1){
               alert("请选择投注号码！");
            } else {
                                if (document.getElementById("lookXieyi").checked) {
                    clearCookie("cookiestr_double_betting");
                    clearCookie("cookiestr_double_betting_arrcount");
                    clearCookie("ArrayList");
                    if (document.getElementById("myself").checked) {
                        jQuery('form').attr("action", "/Ajax/CMember.ashx?t=newarrayByMy&type=5&fctype=4&qs=<%=lotteryqs!=null?lotteryqs.Lotteryqs:"0000000"%>").submit();
                    }
                    if (document.getElementById("together").checked) {

                         if (document.getElementById("lotteryName").value = "") {
                             alert("请输入方案标题!");
                            }
                        else {

                             if (document.getElementById("lotteryxy").value = "") {
                                 alert("请输入合买宣言!");
                             }
                            else {

                                jQuery('form').attr("action", "/Ajax/CMember.ashx?t=newarrayByTogether&type=5&fctype=4&qs=<%=lotteryqs!=null?lotteryqs.Lotteryqs:"0000000"%>").submit();
                            }


                        }

                    }
                }
                else {
                    alert("请阅读协议");
                }
<%--                if (document.getElementById("lookXieyi").checked) {
                    clearCookie("cookiestr_double_betting");
                    clearCookie("cookiestr_double_betting_arrcount");
                    clearCookie("ArrayList");
                    if (document.getElementById("myself").checked) {
                      jQuery('form').attr("action", "/Ajax/CMember.ashx?t=newarrayByMy&type=5&fctype=4&qs=<%=lotteryqs!=null?lotteryqs.Lotteryqs:"0000000"%>").submit();
                    }if(document.getElementById("together").checked) {
                        jQuery('form').attr("action", "/Ajax/CMember.ashx?t=newarrayByTogether&type=5&fctype=4&qs=<%=lotteryqs!=null?lotteryqs.Lotteryqs:"0000000"%>").submit();
                    }
                }else{
                alert("请阅读协议");
            }--%>
          }
                     }
                 }
             });
        }
    function dtAddChild() {
        var ArrayZL = new Array();
           if(ArrayW.length<3){
               alert("至少选择3个号码");
            }else{  
                ArrayW=ArrayW.sort();
                if (ArrayW.length >= 3)
                {
                    for (var i = 0; i < ArrayW.length ; i++)
                    {
                        for (var j = i+1; j < ArrayW.length ; j++)
                        {
                            for (var k = j+1; k < ArrayW.length ; k++)
                            {
                                //------Start------
                                var cookiestr = '';
                                var fgf = '';
                                if (getCookie("cookiestr_3d_betting") != "") {
                                    cookiestr = getCookie("cookiestr_3d_betting");
                                    fgf = ","
                                }
                                //--------End------
                                if (i != j && i != k && j != k)
                                {
                                    var listStr = ArrayW[i] + "," + ArrayW[j] + "," + ArrayW[k];
                                     $('.touchu_ul1').append('<dt ><span class="touchu_ul1_span1" ><a href="JavaScript:void(0);" onclick="javascript:del(this);">删除</a></span><b >组六单式</b><b class="touchu_ul1_b" >' 
                                     + listStr+ '</b> [1注,2元]</dt>');
                                    //------Start------
                                     cookiestr +=fgf + ArrayW[i] + "*" + ArrayW[j] + "*" + ArrayW[k] + "||" + 1 + "||" + 2+"||组六单式";
                                     setCookie("cookiestr_3d_betting", cookiestr, 365);
                                    //--------End------
                                     ArrayList.push(ArrayW[i] + "*" + ArrayW[j] + "*" + ArrayW[k]+"|4");
                                     ArrayZL.push(ArrayW[i] + "*" + ArrayW[j] + "*" + ArrayW[k]);
                                     ArrayDelete.push(ArrayW[i] + "*" + ArrayW[j] + "*" + ArrayW[k]);
                                }
                            }
                        }
                    }
                } 
            }
        //-------------------Start-------------------
           if (getCookie("cookiestr_3d_betting_arrcount") != "") {
               arrcount = parseInt(getCookie("cookiestr_3d_betting_arrcount")) + ArrayZL.length;
           }
           else {
               arrcount = ArrayList.length;
           }
           setCookie("cookiestr_3d_betting_arrcount", arrcount, 365);
           var json = JSON.stringify(ArrayList)
           setCookie("ArrayList_3d", json, 365);
           var jsonDelete = JSON.stringify(ArrayDelete)
           setCookie("ArrayList_3dDelete", jsonDelete, 365);
            //-------------------End-------------------
            jQuery("#totalCout").html(0);
            jQuery("#totalMoney").html(0); 
            $(".ball_btn_active").removeClass("ball_btn_active"); 
            //var arrcount= ArrayList.length;
            jQuery("#yourSelect").html(arrcount);
            var a = document.getElementById("yourMulti").value;
            jQuery("#yourMoney").html(arrcount * 2*a); 
            jQuery("#zhushu").html(arrcount);
            ArrayW = new Array();
            ArrayQ = new Array(); 
            ArrayB = new Array();
            var mymoney = document.getElementById("mymoney");
            calculateMyrg(mymoney);//计算最小认购
        } 
        function del(obj) {
            //-----------------Start-----------------------
            if (getCookie('ArrayList_3d') != '') {
                ArrayList = eval(getCookie('ArrayList_3d'));
            }
            if (getCookie('ArrayList_3dDelete') != '') {
                ArrayDelete = eval(getCookie('ArrayList_3dDelete'));
            }
            //------------------End----------------------
             $(obj).parent().parent().remove(); 
            var num=$(obj).parent().parent().children(".touchu_ul1_b").text();  
            var strNewnum = "";
            if (num == "小") {
                strNewnum = 1;
            }
            else if (num == "大") {
                strNewnum = 2;
            }
            else if (num == "奇") {
                strNewnum = 3;
            }
            else if (num == "偶") {
                strNewnum = 4;
            }
            else {
                strNewnum = num;
                if (strNewnum.substr(strNewnum.length - 1) == ",") {
                    strNewnum = strNewnum.substring(0, strNewnum.length - 1).replace(/\,/g, "*").toString();
                }
                else {
                    strNewnum = num.replace(/\,/g, "*").toString();
                }
            }
            var index = $.inArray(strNewnum, ArrayDelete);
            //var str= new Array();
            //str = num.split(",");
            //if (str.length > 1) {
            //    num = str[0] + "*" + str[1] + "*" + str[2];
            //    strNewnum = num;
            //}
            //else {
            //    if (num == "小") {
            //        strNewnum = 1;
            //    }
            //    else if (num == "大") {
            //        strNewnum = 2;
            //    }
            //    else if (num == "奇") {
            //        strNewnum = 3;
            //    }
            //    else if (num == "偶") {
            //        strNewnum = 4;
            //    }
            //}
            //var index = $.inArray(strNewnum, ArrayList);
             //num=str[0]+"*"+str[1]+"*"+str[2]; 
             //var index = $.inArray(num, ArrayList);
            //-----------------Start-----------------------
             console.log(num);
             console.log(ArrayList);
             var arrdddd = getCookie('cookiestr_3d_betting').split(",");
            //console.log(ArrayList);
             strnum = arrdddd[index].split("||");
            //----------------End------------------------
             ArrayList.splice(index, 1);
             ArrayDelete.splice(index, 1);
            //-----------------Start-----------------------
             arrdddd.splice(index, 1);
             var straaaa = '';
             for (i = 0; i < arrdddd.length; i++) {
                 straaaa += arrdddd[i];
                 if (i < arrdddd.length - 1) {
                     straaaa += ',';
                 }
             }
             setCookie('cookiestr_3d_betting', straaaa, 365);
             var json = JSON.stringify(ArrayList)
             setCookie('ArrayList_3d', json, 365);
             var jsonDelete = JSON.stringify(ArrayDelete)
             setCookie('ArrayList_3dDelete', jsonDelete, 365);
             strnum = strnum[1];
             console.log(index);
             console.log(ArrayDelete);
             console.log(strnum);
             setCookie('cookiestr_3d_betting_arrcount', getCookie('cookiestr_3d_betting_arrcount') - strnum, 365);
            //----------------End------------------------
             arrcount = getCookie('cookiestr_3d_betting_arrcount');
            //var arrcount=ArrayList.length; 
            jQuery("#yourSelect").html(arrcount);
            jQuery("#zhushu").html(arrcount);
            var a = document.getElementById("yourMulti").value;
            jQuery("#yourMoney").html(arrcount * 2 * a);
            var mymoney = document.getElementById("mymoney");
            calculateMyrg(mymoney);//计算最小认购
        }
        //-----------------Start-----------------------
        $(document).ready(function () {
            var cookies_3d_betting = getCookie("cookiestr_3d_betting")
            var arr_cookies = cookies_3d_betting.split(",");
            var cookie_html = '';
            for (var i = 0; i < arr_cookies.length; i++) {
                //console.log(arr_cookies[i]);
                var arraaaa = arr_cookies[i].split("||");
                //var arrbbbb = arraaaa[0].split("+");
                var ccccccc = "";
                if (arraaaa[0].indexOf('*') > 0) {
                    ccccccc = arraaaa[0].replace(/\*/g, ",");
                }
                else {
                    ccccccc = arraaaa[0];
                   
                }
                cookie_html += '<dt ><span class="touchu_ul1_span1" ><a href="JavaScript:void(0);" onclick="javascript:del(this);">删除</a></span><b >'+arraaaa[3]+'</b><b class="touchu_ul1_b" >'
                        + ccccccc + '</b> [' + arraaaa[1] + '注,' + arraaaa[2] + '元]</dt>'
                //console.log(cookie_html);

            }
            if (cookies_3d_betting != '') {
                $(".touchu_ul1").html(cookie_html);
                $("#zhushu").html(getCookie("cookiestr_3d_betting_arrcount"));
            }
        });
        //-----------------End-----------------------
        function returnStr(arr){
           var str="";
           arr.sort();
           for(var i=0;i<arr.length;i++){
              str+=arr[i];
           }
           return str;
        } 
        function setBall(type,value){
            var ArrayFlag = new Array(); 
            for(var i=0;i<10;i++){ 
                  $("#span"+type+i).removeClass("ball_btn_active"); 
               }
            if(value==0){ 
               for(var i=0;i<10;i++){
                  ArrayFlag.push(i);
                  $("#span"+type+i).toggleClass("ball_btn_active");
               }
            }else if(value==1){
               for(var i=5;i<10;i++){
                  ArrayFlag.push(i);
                  $("#span"+type+i).toggleClass("ball_btn_active");
               }
            }else if(value==2){
               for(var i=0;i<5;i++){
                  ArrayFlag.push(i);
                  $("#span"+type+i).toggleClass("ball_btn_active");
               }
            }else if(value==3){
               for(var i=0;i<10;i++){
                  ArrayFlag.push(i+1);
                  $("#span"+type+(i+1)).toggleClass("ball_btn_active");
                  i++;
               }
            }else if(value==4){
               for(var i=0;i<10;i++){
                  ArrayFlag.push(i);
                  $("#span"+type+i).toggleClass("ball_btn_active");
                  i++;
               }
            }
            if(type==0){ 
                ArrayW = new Array();  ArrayW=ArrayFlag;
            }
            sumTotal();
        }
        function clear(type){
            for(var i=0;i<10;i++){ 
                  $("#span"+type+i).removeClass("ball_btn_active"); 
               }
            if(type==0){ 
                ArrayW = new Array();  
            }
            count = parseInt(ArrayW.length);  
            jQuery("#zhushu").html(0);
            jQuery("#totalCout").html(count);
            jQuery("#totalMoney").html(count*2);
        } 
        
         function getPL3Random(num) { 
            for(var i=0;i<num;i++){
                var thisRandom_1 = Math.floor(Math.random() * 9); 
                var thisRandom_2=0;
                var thisRandom_3=0;
                if(thisRandom_1>8){ 
                  thisRandom_2=thisRandom_1-3;
                  thisRandom_3=thisRandom_2-1;
                }else if(thisRandom_1<3){
                  thisRandom_1=thisRandom_1+6;
                  thisRandom_2=thisRandom_1-3;
                  thisRandom_3=thisRandom_2-2; 
                }else{ 
                  thisRandom_2=thisRandom_1+1;
                  thisRandom_3=thisRandom_2-3; 
                }
                $('.touchu_ul1').append('<dt><span class="touchu_ul1_span1" ><a href="JavaScript:void(0);" onclick="javascript:del(this);">删除</a></span>'
                +'<b >组六单式</b><b class="touchu_ul1_b" >' 
                + thisRandom_1 + ','+thisRandom_2+','+thisRandom_3+'</b> [1注,2元]</dt>'); 
                ArrayList.push(thisRandom_1 + '*' + thisRandom_2 + '*' + thisRandom_3 + "|4");
                ArrayDelete.push(thisRandom_1 + '*' + thisRandom_2 + '*' + thisRandom_3);
                //-----------------Start-----------------------
                var cookiestr = '';
                var fgf = '';
                if (getCookie("cookiestr_3d_betting") != "") {
                    cookiestr = getCookie("cookiestr_3d_betting");
                    fgf = ","
                }
                cookiestr +=fgf + thisRandom_1 + '*' + thisRandom_2 + '*' + thisRandom_3 + "||1||2||组六单式";
                setCookie("cookiestr_3d_betting", cookiestr, 365);
                //-----------------End-----------------------
                }    
             //var arrcount=ArrayList.length; 
            if (getCookie("cookiestr_3d_betting_arrcount") != "") {
                arrcount = parseInt(getCookie("cookiestr_3d_betting_arrcount")) + num;
            }
            else {
                arrcount =num;
            }
            jQuery("#yourSelect").html(arrcount);
            jQuery("#zhushu").html(arrcount);
            var a = document.getElementById("yourMulti").value;
            jQuery("#yourMoney").html(arrcount * 2*a);
             //-----------------Start-----------------------
            setCookie("cookiestr_3d_betting_arrcount", arrcount, 365);
            var json = JSON.stringify(ArrayList)
            setCookie("ArrayList_3d", json, 365);
            var jsonDelete = JSON.stringify(ArrayDelete)
            setCookie("ArrayList_3dDelete", jsonDelete, 365);
             //-----------------End-----------------------
            var mymoney = document.getElementById("mymoney");
            calculateMyrg(mymoney);//计算最小认购
        }
         function clearAll() {
             //-----------------Start-----------------------
             clearCookie("cookiestr_3d_betting");
             clearCookie("cookiestr_3d_betting_arrcount");
             clearCookie("ArrayList_3d");
             clearCookie("ArrayList_3dDelete");
             //-----------------End-----------------------
           lotterystr=""; 
            ArrayList=new Array();
           count=0;
           jQuery("#yourSelect").html(count);
           jQuery("#yourMoney").html(count * 2); 
            jQuery("#zhushu").html(0);
           $(".touchu_ul1_span1").parent().remove();
        }  
         function clearupAll() {  
            ArrayW = new Array();
            ArrayQ = new Array(); 
            ArrayB = new Array(); 
            count=0;
            jQuery("#totalCout").html(0);
            jQuery("#totalMoney").html(0);
            jQuery("#zhushu").html(0);
            $(".ball_btn_active").removeClass("ball_btn_active");  
        }
        function fillB(){
          var a=document.getElementById("yourMulti").value;
          if(a<=0){
              document.getElementById("yourMulti").value=1;
              return;
          }
          var b=jQuery("#zhushu").text();  
          jQuery("#yourMoney").html(a * b * 2);
          var mymoney = document.getElementById("mymoney");
          calculateMyrg(mymoney);//计算最小认购
        }
        function setSelectValue(){
          var a=document.getElementById("ticheng").value; 
          document.getElementById("selectHid").value = a; 
        }  
         function calculateMyrg(obj) {  
          var account=ArrayList.length;;
          var reg = new RegExp("^[0-9]*$");
          if (!reg.test(obj.value)) {
           obj.value=0;
          } 
          if (parseInt(obj.value) < Math.round(account*2*0.05*jQuery("#yourMulti").val())) {
            obj.value=Math.round(account*2*0.05*jQuery("#yourMulti").val());
          }
          if (parseInt(obj.value) > account*2*jQuery("#yourMulti").val()) {
            obj.value= account*2*jQuery("#yourMulti").val();
          } 
          jQuery("#rengou").html(jQuery("#mymoney").val()); 
          jQuery("#zhifu").html(parseInt(jQuery("#rengou").html()*1)+parseInt(jQuery("#mybd").val()*1)); 

          if (parseInt(obj.value) > parseInt(account * 2 * jQuery("#yourMulti").val() - jQuery("#mybd").val())) {
            var ss=parseInt(account*2*jQuery("#yourMulti").val()-jQuery("#mymoney").val()); 
            document.getElementById("mybd").value=ss;  
          }else{
            jQuery("#mybd").html(obj.value*1); 
          } 
          jQuery("#baodi").html(jQuery("#mybd").val());  
          jQuery("#zhifu").html(parseInt(jQuery("#rengou").html()*1)+parseInt(jQuery("#mybd").val()*1)); 

        }
        function calculateMybd(obj) {   
          var account=ArrayList.length;;
          var reg = new RegExp("^[0-9]*$");
          if (!reg.test(obj.value)) {
           obj.value=0;
          } 
          if (parseInt(obj.value) < 0) {
            obj.value=0;
          }  
           if (parseInt(obj.value) < Math.round(account*2*0.05*jQuery("#yourMulti").val())) {
            obj.value=Math.round(account*2*0.05*jQuery("#yourMulti").val());
          }
          if (parseInt(obj.value) > account*2*jQuery("#yourMulti").val()) {
            obj.value= account*2*jQuery("#yourMulti").val();
          } 
          jQuery("#rengou").html(jQuery("#mymoney").val()); 
          jQuery("#zhifu").html(parseInt(jQuery("#rengou").html()*1)+parseInt(jQuery("#mybd").val()*1)); 

          if (parseInt(obj.value) > parseInt(account*2*jQuery("#yourMulti").val()-jQuery("#mymoney").val())) {
            var ss=parseInt(account*2*jQuery("#yourMulti").val()-jQuery("#mymoney").val()); 
            document.getElementById("mybd").value=ss;  
          }else{
            jQuery("#mybd").html(obj.value*1); 
          } 
          jQuery("#baodi").html(jQuery("#mybd").val());  
          jQuery("#zhifu").html(parseInt(jQuery("#rengou").html()*1)+parseInt(jQuery("#mybd").val()*1)); 
        }
        //-----------------Start-----------------------
        //设置cookie
        function setCookie(cname, cvalue, exdays) {
            var d = new Date();
            d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
            var expires = "expires=" + d.toUTCString();
            document.cookie = cname + "=" + cvalue + "; " + expires;
        }
        //获取cookie
        function getCookie(cname) {
            var name = cname + "=";
            var ca = document.cookie.split(';');
            for (var i = 0; i < ca.length; i++) {
                var c = ca[i];
                while (c.charAt(0) == ' ') c = c.substring(1);
                if (c.indexOf(name) != -1) return c.substring(name.length, c.length);
            }
            return "";
        }
        //清除cookie  
        function clearCookie(name) {
            setCookie(name, "", -1);
        }
        //-----------------End----------------------
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<!--BettingContent-->
<div class="betting_content">
    <!--Left-->
    <div class="betting_left">
        <h2 class="betting_prompt">
            <b>玩法提示：</b>选号与奖号相同（顺序不限）即中<em>173</em>元 中奖示例：选号168 186 618 681 861 816 奖号168 
        </h2>
        <!--Choose-->
        <div class="betting_choose_ball_box">
            <div class="sD_left_ball">
                <h2><b>选号区</b> 每位至少选择1个号码</h2>
                <div class="betting_prompt_left">
                    <h4 class="choose">号码</h4>
                    <h3>
                        <p>遗漏</p>
                        <div><b>遗漏：</b>指该号码自上次开出以来至本次末出现的期数</div>
                    </h3>    
                </div>
                <ul class="sD_choose_ball">
                   <input type="hidden" id="lotteryStr" name="lotteryStr"/>
                  <input type="hidden" id="Hidden1" name="Hidden1"/> 
                    <li>
                        <em class="ball_btn" id="span00" onclick="javascript:addRedBall(this,0);">0</em>
                        <span>1</span>
                    </li>
                    <li>
                        <em class="ball_btn"  id="span01" onclick="javascript:addRedBall(this,1);">1</em>
                        <span>2</span>
                    </li>
                    <li>
                        <em class="ball_btn" id="span02" onclick="javascript:addRedBall(this,2);">2</em>
                        <span>3</span>
                    </li>
                    <li>
                        <em class="ball_btn" id="span03" onclick="javascript:addRedBall(this,3);">3</em>
                        <span>4</span>
                    </li>
                    <li>
                        <em class="ball_btn" id="span04" onclick="javascript:addRedBall(this,4);">4</em>
                        <span>5</span>
                    </li>
                    <li>
                        <em class="ball_btn" id="span05" onclick="javascript:addRedBall(this,5);">5</em>
                        <span>6</span>
                    </li>
                    <li>
                        <em class="ball_btn" id="span06" onclick="javascript:addRedBall(this,6);">6</em>
                        <span>7</span>
                    </li>
                    <li>
                        <em class="ball_btn" id="span07" onclick="javascript:addRedBall(this,7);">7</em>
                        <span>8</span>
                    </li>
                    <li>
                        <em class="ball_btn" id="span08" onclick="javascript:addRedBall(this,8);">8</em>
                        <span>9</span>
                    </li>
                     <li>
                        <em class="ball_btn" id="span09" onclick="javascript:addRedBall(this,9);">9</em>
                        <span>9</span>
                    </li>
                     
                </ul>                
            </div>
            <div class="sD_fastball">
                <h2><b>操作区</b> 快捷选号</h2>
                <dl class="fast_choose">
                    <dd><a href="javascript:void(0);" onclick="javascript:setBall(0,0);">全</a></dd>
                    <dd><a href="javascript:void(0);" onclick="javascript:setBall(0,1);">大</a></dd>
                    <dd><a href="javascript:void(0);" onclick="javascript:setBall(0,2);">小</a></dd>
                    <dd><a href="javascript:void(0);" onclick="javascript:setBall(0,3);">奇</a></dd>
                    <dd><a href="javascript:void(0);" onclick="javascript:setBall(0,4);">偶</a></dd>
                    <dt><a  href="javascript:clear(0);">清除</a></dt>
                </dl> 
            </div>
        </div>
        <!--Choose-->
        <!--1-->
        <div class="choose_results_ball">
            您选择了 <b><span class="hong2" id="totalCout">0</span></b> 注，共 <b><span class="hong2" id="totalMoney">0</span></b> 元
        </div>
        <div class="betting_choose_confirm">
            <input type="button"  onclick="javascript:dtAddChild();" class="choose_num" value="确认选号" />  
        <a href="javascript:void(0);" onclick="javascript:clearupAll();"  class="choose_a" > 清空选号</a>
        </div> 
        <!--1-->
        <!--2-->
        <div class="betting_choose_box">
            <div class="betting_choose_box_t">
                <h3 class="">共<b><span  id="zhushu">0</span></b>注</h3>
                <ul class="betting_choose_tul">
                <li ><a href="javascript:void(0);" onclick="javascript:getPL3Random(1);">机选1注</a></li>
          <li ><a href="javascript:void(0);" onclick="javascript:getPL3Random(5);" >机选5注</a></li>
          <li ><a href="javascript:void(0);" onclick="javascript:getPL3Random(10);" >机选10注</a></li>  
                </ul>
                <a href="javascript:void(0);" onclick="javascript:clearAll();"  class="betting_choose_a">清空</a>
            </div>
             <dl class="touchu_ul1" >
             </dl>
            <ul class="betting_choose_ul">
                <%--<li><a href="">导入方案</a></li>
                <li><a href="">保存方案</a></li>
                <li><a href="">对比历史开奖</a></li>--%>
            </ul>
        </div> 
        <!--2-->
        <div class="betting_choose_num">
            您选了 <span class="hong3 stong" id="yourSelect" name="yourSelect"> 0 </span> 注， 倍投 
             <input type="text" class="betting_choose_btn" id="yourMulti" name="yourMulti" value="1" onblur="fillB()"> 
            倍，共 <span class="hong3 stong" id="yourMoney" name="yourMoney" >0</span> 元
        </div>
        <!--3-->
        <div class="betting_way_box">
            <div class="betting_way_title">
                <b>投注方式：</b>
                <ul class="betting_way_t_ul">
                    
                    <li>
                        <input type="radio" checked="checked" id="myself" name="selectMy" onClick="displayck()"/>自购</li>
                    <li>
                        <input type="radio" id="together" name="selectMy" onClick="displaycl()"/>发起合买</li>
                </ul>
                <p class="betting_way_infor">多人出资购买彩票，奖金按购买比例分享</p>
            </div>
            
        <div class="tab-pane"  id="myselfDiv" style="display:none;" >
            <ul class="betting_way_con">
                <li>
                    <p class="b_w_c_n">方案标题：</p>
            <input class="b_w_c_box" tabindex="1" autocomplete="off" max="15" type="text" placeholder="福彩3d第2014151期" id="lotteryName" name="lotteryName">  
                    <p class="b_w_c_i">还可以填写<b>15</b>字</p>
                </li>
                <li>
                    <p class="b_w_c_n">合买宣言：</p>
            <textarea class="b_w_c_box2" tabindex="2"  autocomplete="off" max="50" placeholder="这个人很聪明，只等中大奖" id="lotteryxy" name="lotteryxy"></textarea>
                    <p class="b_w_c_i">还可以填写<b>50</b>字</p>
                </li>
                <li>
                   <p class="b_w_c_n">盈利提成：</p>
                    <input type="hidden" id="selectHid" name="selectHid" value="0.00"/> 
            <select name="a3"  tabindex="3"  autocomplete="off" class="b_w_c_box4" id="ticheng" onchange="javascript:setSelectValue();">
              <option value="0.00" selected="selected">0%</option>
              <option value="0.01">1%</option>
              <option value="0.02">2%</option>
              <option value="0.03">3%</option>
              <option value="0.04">4%</option>
              <option value="0.05">5%</option>
              <option value="0.06">6%</option>
              <option value="0.07">7%</option>
              <option value="0.08">8%</option>
              <option value="0.09">9%</option>
              <option value="0.10">10%</option>
            </select> 
                    <p class="b_w_c_i">【盈利提成 =（税后奖金 - 方案金额）× 提成比例】<div><div class="b_que"><div>盈利提成:方案中奖并且盈利。</div></div></p>
                 </li>
                <li>
                    <p class="b_w_c_n">我要认购：</p>
                            <input class="b_w_c_box3" tabindex="4"  autocomplete="off" type="text" id="mymoney" name="mymoney" onblur="javascript:calculateMyrg(this);" value="1"/>
           <p class="b_w_c_i">元  发起人至少认购<b>5</b>%</p>
                </li>
                <li>
                    <p class="b_w_c_n">我要保底：</p>
                        <input class="b_w_c_box3" tabindex="5"  autocomplete="off" type="text" id="mybd" name="mybd" onblur="javascript:calculateMybd(this);" value="0"/>
              <p class="b_w_c_i">元  <a href="">全保</a>  <%--最多可保底 <b>0</b>元--%><div><div class="b_que"><div>合买保底发起时，系统将会先从发起人账户内扣除相应的金额</div></div></p>
                </li>
                <li>
                    <p class="b_w_c_n">是否公开：</p>
                    <dl class="b_w_c_dl">
                     <input type="hidden" id="gongkaiHid" name="gongkaiHid" value="1"/> 
                        <dd><input type="radio" checked="checked" id="gongkai1" name="gongkai" onclick="javascript:setgongkai(1);"/>公开</dd>
                        <dd><input type="radio" id="gongkai2" name="gongkai" onclick="javascript:setgongkai(2);"/>&nbsp;销售截止后公开</dd>
                        <dd><input type="radio" id="gongkai3" name="gongkai" onclick="javascript:setgongkai(3);"/>&nbsp;仅对认购用户公开</dd>
                    </dl>
                </li>
            </ul>
             <div class="betting_way_bottom">
                <p>您需支付：<b><span id="zhifu">0</span></b>元
                (认购<b><span id="rengou">0</span></b>元 + 保底<b><span id="baodi">0</span></b>元) </p>
                <p class=b_right>注：方案进度+保底≥100%，即可出票</p>
            </div> 
            </div>
        </div>
        <!--3-->
        <div class="betting_choose_confirm">
        <input  type="button" onclick="javascript:addBuyInfo();" value="确认投注" class="choose_num"/> 
        </div> 
        <p class="betting_agree">
            <input type="checkbox" checked="checked" id="lookXieyi" >
            我已阅读并同意<a href="">&lt;&lt;用户委托投注协议&gt;&gt;</a>
         </p>
         <p class="betting_t">
            <span>福彩3D中奖说明</span>
         </p>
         <div class="threeLottery">
            <table class="threeLottery_table" border="0" cellspacing="0" cellpadding="0">
                <tr class="sD_title">
                    <td class="w98">玩法</td>
                    <td class="w290">投注规则</td>
                    <td class="w375">中奖规则</td>
                    <td class="w96">单注奖金</td>
                </tr>
                <tr class="sD_body">
                    <td class="w74">直选</td>
                    <td class="w270">对三个号码以唯一的排列方式进行投注</td>
                    <td class="w355">买3个号，数字相同，位置相同 买456开456</td>
                    <td class="w960">1040元</td>
                </tr>
                <tr class="sD_body">
                    <td class="w74">通选投注</td>
                    <td class="w270">对三个号码以唯一的排列方式进行投注</td>
                    <td class="w355">
                        <div class="t_l_box">投注号码与当期开奖号码按位全部相同 买 456开456</div>
                        <div class="t_l_box">投注与开奖号 任意两位 相同 ，买123，开12*、1*3、*23</div>
                    </td>
                    <td class="w960">
                        <div class="t_l_box">470元</div>
                        <div class="t_l_box">21元</div>
                    </td>
                </tr>
                <tr class="sD_body">
                    <td class="w74">
                        <div class="t_l_box2">组三</div>
                        <div class="t_l_box2">组六</div>
                    </td>
                    <td class="w270">
                        <div>三个号码中有两个号码相同， 有 三种不同的排列方式，为“组 三 ”；如果一注组选的三
个号码各不相同， 有 六种不同的排列方式，称为“组 六 ”。</div>
                    </td>
                    <td class="w355">
                        <div class="t_l_box2">买3个号，数字相同，位置随意买112，开112、121、211</div>
                        <div class="t_l_box2">买123，开123、132、213、231、312、321</div>
                    </td>
                    <td class="w960">
                        <div class="t_l_box2">346元</div>
                        <div class="t_l_box2">173元</div>
                    </td>
                </tr>
                <tr class="sD_body">
                    <td class="w74">和数</td>
                    <td class="w270">是指对三个号码相加之和进行投注</td>
                    <td class="w355">买和，和值正确买和2，开002、020、200、011、101、110</td>
                    <td class="w960">14-1040元</td>
                </tr>
                <tr class="sD_body">
                    <td class="w74">1D投注</td>
                    <td class="w270">对 百十个位中某一位置上的号码投注</td>
                    <td class="w355">买1个号，数字正确，位置相同买*1*，开*1*</td>
                    <td class="w960">10元</td>
                </tr>
                <tr class="sD_body">
                    <td class="w74">猜1D投注</td>
                    <td class="w270">对百十个位中某一位置上的号码投注</td>
                    <td class="w355">
                        <div class="t_l_box">
                            <h2>猜中1	</h2>
                            <p>买1开出1**、*1*、**1</p>
                        </div>
                        <div class="t_l_box">
                            <h2>猜中2	</h2>
                            <p>买1开出11*、1*1、*11</p>
                        </div>
                        <div class="t_l_box">
                            <h2>猜中2	</h2>
                            <p>1开出111 （豹子号）</p>
                        </div>
                    </td>
                    <td class="w960">
                        <div class="t_l_box">2元</div>
                        <div class="t_l_box">12元</div>
                        <div class="t_l_box">1040元</div>
                    </td>
                </tr>
                <tr class="sD_body">
                    <td class="w74">2D投注</td>
                    <td class="w270">对百十个位中某两个位置上的号码投注</td>
                    <td class="w355">买2个号，数字正确，位置相同买*12，开*12</td>
                    <td class="w960">470元</td>
                </tr>
                <tr class="sD_body">
                    <td class="w74">猜2D投注</td>
                    <td class="w270">对百十个位中某两个位置上的号码投注</td>
                    <td class="w355">
                        <div class="t_l_box">
                            <h2>两同号</h2>
                            <p>买11，开出11*、1*1、*11</p>
                        </div>
                        <div class="t_l_box">
                            <h2>两不同号</h2>
                            <p>买12，开12*、1*2、*12、*21、21*、2*1</p>
                        </div>
                    </td>
                    <td class="w960">
                        <div class="t_l_box">21元</div>
                        <div class="t_l_box">346元</div>
                    </td>
                </tr>
                <tr class="sD_body">
                    <td class="w74">包选投注</td>
                    <td class="w270">指同时用单选和组选的方式对三个号码进行投注。</td>
                    <td class="w355">
                        <div class="t_l_box">
                            <h2>包选三全中</h2>
                            <p>买011，开011</p>
                        </div>
                        <div class="t_l_box">
                            <h2>包选三组中</h2>
                            <p>011，开101、110</p>
                        </div>
                        <div class="t_l_box">
                            <h2>包选六全中</h2>
                            <p>123，开123</p>
                        </div>
                        <div class="t_l_box">
                            <h2>包选六组中</h2>
                            <p>买123，开132、213、231 、 312、321</p>
                        </div>
                    </td>
                    <td class="w960">
                        <div class="t_l_box">173元</div>
                        <div class="t_l_box">14-1040 元</div>
                        <div class="t_l_box">10元</div>
                        <div class="t_l_box">2元</div>
                    </td>
                </tr>
                <tr class="sD_body">
                    <td class="w74">猜大小</td>
                    <td class="w270">对三个号码相加之和的大小进行投注。</td>
                    <td class="w355">19 (含)至27 含)时为大，在0 (含)至8(含)之间时为小</td>
                    <td class="w960">12元</td>
                </tr>
                <tr class="sD_body">
                    <td class="w74">猜奇偶</td>
                    <td class="w270">对全部三个号码的奇数、偶数投注。</td>
                    <td class="w355">买奇，开出全奇号即中奖，买偶开出全偶即中奖</td>
                    <td class="w960">1040元</td>
                </tr>
                <tr class="sD_body">
                    <td class="w74">猜三同</td>
                    <td class="w270">是指对全部三个相同的号码进行投注</td>
                    <td class="w355">猜是否出豹子号</td>
                    <td class="w960">470元</td>
                </tr>
                <tr class="sD_body">
                    <td class="w74">拖拉机</td>
                    <td class="w270">对三个号码为以升序或降序连续排列的号码（890、098、901、109除外） 投注</td>
                    <td class="w355">猜是否出拖拉机（890、098、901、109除外）</td>
                    <td class="w960">346元</td>
                </tr>
            </table>
         </div>
    </div>
    <!--Left-->
    <!--Right-->
    <div class="betting_right">
        <uc1:forecast ID="forecast1" runat="server"></uc1:forecast>
   <%-- <div class="betting_predict">
        <div class="betting_predict_t">
            <h2>预测选号</h2>
            <span><a href="">更多&gt;&gt;</a></span>
        </div>
         <ul class="betting_predict_ul">
        <%if (newsList.Count > 0)
          {
              for (int i = 0; i < newsList.Count; i++)
              {%>
              
            <li>·<a href="news_details.aspx?id=<%=newsList[i].id%>&type=8"><%=newsList[i].Title%></a></li> 
            <%}
          } %>
        </ul>
    </div>--%>
    <!--PaiHang-->
        <%-- <div class="d_r_t">
            <h2>中彩排行</h2>
            <p>本站累计中奖<span><%=jiangjin2 %></span> 亿元</p>
        </div>
        <ul class="d_paihang">
          <%if (userAccount != null && userAccount.Count > 0)
              {
                  for (int i = 0; i < (userAccount.Count > 12 ? 12 : userAccount.Count); i++) 
                  {
                      %> 
        <li>
                <b <%if(i<3){ %>class="yellowbg"<%}else{ %> class="p_n"<%} %>><%=i+1 %></b>
                <p class="p_n"><%=SelectName(userAccount[i].user_id)%></p>
                <p class="p_date"><%=Convert.ToDecimal(userAccount[i].winTotal) % 100000000 / 10000%> 万元</p>
            </li> 
          <% }
              }%>   
        </ul>--%>
        <!--PaiHang-->
    </div>
    <!--Right-->
</div>
<!--BettingContent-->
</asp:Content>
